<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../../js库/mock.js"></script>
    <script src="../../js库/vue.js"></script>
    <title>css浮动练习</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        div#root {
            width: 1000px;
            height: 500px;
            margin: 0 auto;
            background-color: palegreen;
        }

        div.ul {
            float: left;
            width: 30%;
            height: 100%;
            background-color: pink;
        }

        ul {
            list-style: none;
        }

        ul>li {
            height: 62.5px;
            text-align: left;
            /* 如果没有指定宽度 则盒子的宽度保持不变 */
            padding-left: 30px;
            line-height: 62.5px;

            background-color: grey;
        }

        li:hover {
            background-color: orange;
        }
        div.right {
            float: right;
            width: 70%;
            height: 100%;
       
        }
        img {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <div id="root">
        <div class="ul">
            <ul>
                <li v-for="(li,index) in list" :key="index">{{li}}</li>
            </ul>
        </div>
      <div class="right">
        <img src="/picture/all.jpeg" alt="#">
      </div>
    </div>

    </div>
</body>
<script>
    new Vue({
        el: '#root',
        data() {
            return {
                list: [
                    "手机 电话卡",
                    "电视 盒子",
                    "笔记本 平板",
                    "出行 穿戴",
                    "智能 路由器",
                    "健康 儿童",
                    "耳机 音响",
                    "家具 耳机"
                ]
            }
        },
    })
</script>

</html>